3.21 \(\int \frac{(a+b \tan ^{-1}(c x))^2}{x^3} \, dx\)

Optimal. Leaf size=79 \[ -\frac{1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} b^2 c^2 \log \left (c^2 x^2+1\right )+b^2 c^2 \log (x) \]

[Out]

-((b*c*(a + b*ArcTan[c*x]))/x) - (c^2*(a + b*ArcTan[c*x])^2)/2 - (a + b*ArcTan[c*x])^2/(2*x^2) + b^2*c^2*Log[x
] - (b^2*c^2*Log[1 + c^2*x^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.127518, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4852, 4918, 266, 36, 29, 31, 4884} \[ -\frac{1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} b^2 c^2 \log \left (c^2 x^2+1\right )+b^2 c^2 \log (x) \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])^2/x^3,x]

[Out]

-((b*c*(a + b*ArcTan[c*x]))/x) - (c^2*(a + b*ArcTan[c*x])^2)/2 - (a + b*ArcTan[c*x])^2/(2*x^2) + b^2*c^2*Log[x
] - (b^2*c^2*Log[1 + c^2*x^2])/2

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 4918

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[1/d,
 Int[(f*x)^m*(a + b*ArcTan[c*x])^p, x], x] - Dist[e/(d*f^2), Int[((f*x)^(m + 2)*(a + b*ArcTan[c*x])^p)/(d + e*
x^2), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && LtQ[m, -1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{x^3} \, dx &=-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+(b c) \int \frac{a+b \tan ^{-1}(c x)}{x^2 \left (1+c^2 x^2\right )} \, dx\\ &=-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+(b c) \int \frac{a+b \tan ^{-1}(c x)}{x^2} \, dx-\left (b c^3\right ) \int \frac{a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx\\ &=-\frac{b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+\left (b^2 c^2\right ) \int \frac{1}{x \left (1+c^2 x^2\right )} \, dx\\ &=-\frac{b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+\frac{1}{2} \left (b^2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac{b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+\frac{1}{2} \left (b^2 c^2\right ) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )-\frac{1}{2} \left (b^2 c^4\right ) \operatorname{Subst}\left (\int \frac{1}{1+c^2 x} \, dx,x,x^2\right )\\ &=-\frac{b c \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} c^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}+b^2 c^2 \log (x)-\frac{1}{2} b^2 c^2 \log \left (1+c^2 x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0649456, size = 90, normalized size = 1.14 \[ -\frac{a^2+2 b \tan ^{-1}(c x) \left (a c^2 x^2+a+b c x\right )+2 a b c x-2 b^2 c^2 x^2 \log (x)+b^2 c^2 x^2 \log \left (c^2 x^2+1\right )+b^2 \left (c^2 x^2+1\right ) \tan ^{-1}(c x)^2}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTan[c*x])^2/x^3,x]

[Out]

-(a^2 + 2*a*b*c*x + 2*b*(a + b*c*x + a*c^2*x^2)*ArcTan[c*x] + b^2*(1 + c^2*x^2)*ArcTan[c*x]^2 - 2*b^2*c^2*x^2*
Log[x] + b^2*c^2*x^2*Log[1 + c^2*x^2])/(2*x^2)

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 110, normalized size = 1.4 \begin{align*} -{\frac{{a}^{2}}{2\,{x}^{2}}}-{\frac{{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{2\,{x}^{2}}}-{\frac{{c}^{2}{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{2}}-{\frac{c{b}^{2}\arctan \left ( cx \right ) }{x}}-{\frac{{b}^{2}{c}^{2}\ln \left ({c}^{2}{x}^{2}+1 \right ) }{2}}+{c}^{2}{b}^{2}\ln \left ( cx \right ) -{\frac{ab\arctan \left ( cx \right ) }{{x}^{2}}}-{c}^{2}ab\arctan \left ( cx \right ) -{\frac{abc}{x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))^2/x^3,x)

[Out]

-1/2*a^2/x^2-1/2*b^2/x^2*arctan(c*x)^2-1/2*c^2*b^2*arctan(c*x)^2-c*b^2*arctan(c*x)/x-1/2*b^2*c^2*ln(c^2*x^2+1)
+c^2*b^2*ln(c*x)-a*b/x^2*arctan(c*x)-c^2*a*b*arctan(c*x)-a*b*c/x

________________________________________________________________________________________

Maxima [A]  time = 1.49703, size = 132, normalized size = 1.67 \begin{align*} -{\left ({\left (c \arctan \left (c x\right ) + \frac{1}{x}\right )} c + \frac{\arctan \left (c x\right )}{x^{2}}\right )} a b + \frac{1}{2} \,{\left ({\left (\arctan \left (c x\right )^{2} - \log \left (c^{2} x^{2} + 1\right ) + 2 \, \log \left (x\right )\right )} c^{2} - 2 \,{\left (c \arctan \left (c x\right ) + \frac{1}{x}\right )} c \arctan \left (c x\right )\right )} b^{2} - \frac{b^{2} \arctan \left (c x\right )^{2}}{2 \, x^{2}} - \frac{a^{2}}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/x^3,x, algorithm="maxima")

[Out]

-((c*arctan(c*x) + 1/x)*c + arctan(c*x)/x^2)*a*b + 1/2*((arctan(c*x)^2 - log(c^2*x^2 + 1) + 2*log(x))*c^2 - 2*
(c*arctan(c*x) + 1/x)*c*arctan(c*x))*b^2 - 1/2*b^2*arctan(c*x)^2/x^2 - 1/2*a^2/x^2

________________________________________________________________________________________

Fricas [A]  time = 2.54015, size = 221, normalized size = 2.8 \begin{align*} -\frac{b^{2} c^{2} x^{2} \log \left (c^{2} x^{2} + 1\right ) - 2 \, b^{2} c^{2} x^{2} \log \left (x\right ) + 2 \, a b c x +{\left (b^{2} c^{2} x^{2} + b^{2}\right )} \arctan \left (c x\right )^{2} + a^{2} + 2 \,{\left (a b c^{2} x^{2} + b^{2} c x + a b\right )} \arctan \left (c x\right )}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/x^3,x, algorithm="fricas")

[Out]

-1/2*(b^2*c^2*x^2*log(c^2*x^2 + 1) - 2*b^2*c^2*x^2*log(x) + 2*a*b*c*x + (b^2*c^2*x^2 + b^2)*arctan(c*x)^2 + a^
2 + 2*(a*b*c^2*x^2 + b^2*c*x + a*b)*arctan(c*x))/x^2

________________________________________________________________________________________

Sympy [A]  time = 1.45158, size = 119, normalized size = 1.51 \begin{align*} \begin{cases} - \frac{a^{2}}{2 x^{2}} - a b c^{2} \operatorname{atan}{\left (c x \right )} - \frac{a b c}{x} - \frac{a b \operatorname{atan}{\left (c x \right )}}{x^{2}} + b^{2} c^{2} \log{\left (x \right )} - \frac{b^{2} c^{2} \log{\left (x^{2} + \frac{1}{c^{2}} \right )}}{2} - \frac{b^{2} c^{2} \operatorname{atan}^{2}{\left (c x \right )}}{2} - \frac{b^{2} c \operatorname{atan}{\left (c x \right )}}{x} - \frac{b^{2} \operatorname{atan}^{2}{\left (c x \right )}}{2 x^{2}} & \text{for}\: c \neq 0 \\- \frac{a^{2}}{2 x^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))**2/x**3,x)

[Out]

Piecewise((-a**2/(2*x**2) - a*b*c**2*atan(c*x) - a*b*c/x - a*b*atan(c*x)/x**2 + b**2*c**2*log(x) - b**2*c**2*l
og(x**2 + c**(-2))/2 - b**2*c**2*atan(c*x)**2/2 - b**2*c*atan(c*x)/x - b**2*atan(c*x)**2/(2*x**2), Ne(c, 0)),
(-a**2/(2*x**2), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/x^3,x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)^2/x^3, x)